//项目路由
import {lazy,Suspense} from "react"
import {Route,Redirect,Switch} from 'react-router-dom'
import Loading from '@/components/Loading'

//后台首页
const Home = lazy(() => import('@/views/home/Index'))
const Login = lazy(() => import('@/views/Login/Index'))

//
const Routes =()=>{
    return (
        <Suspense fallback={<Loading/>}>
            <Switch>
				<Route path="/home" component={Home}></Route>
				<Route path='/login' component={Login} />
			
			<Redirect from="/" to="/login"/>
            </Switch>
        </Suspense>
    )
}

export default Routes